<?php

Class WorkExperience extends AppModel {

    var $name = 'WorkExperience';
    var $useTable = 'work_experiences';

    /*
     * belongsTo association with other application models
     */
    var $belongsTo = array(
            'Person' => array(
                'className' => 'Person'
            ),
            'Company' => array(
                'className' => 'Company'
            ),
            'Position' => array(
                'className' => 'Position'
            ),
            'Sector' => array(
                'className' => 'Sector'
            )
        );

    var $validate = array(
        'from' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'to' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'activity' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        ),
        'company_id' => array(
            'rule' => 'notEmpty',
            'message' => 'Questo campo e\' obbligatorio'
        )
    );


}

?>
